package mission009;

import java.util.List;

/**
 * @author Admin
 * @create 2019/10/18
 * @since 1.0.0
 */
public class Dog extends Animal implements IPet{
    public Dog(){
        super();
    }

    public Dog(String name) {
        super(name);
    }

    public void cry() {
        for (Object sounds:getSounds()) {
            System.out.println(this.getName() + "饿了发出" + getSounds() + "的叫声");
        }
    }

    public void eat(){
//        List<Food> foods =getFoods();
        for (Food food:getFoods()) {
            System.out.println(this.getName()+food.getName()+"价格是"+food.getPrice());
        }
    }
}
